<template>
  <div>
    <article-audit-list v-if="articleAuditShow === 'list'"
                        v-on:turnPage="turnPage"></article-audit-list>
    <display-article-audit v-if="articleAuditShow === 'display'"
                           :articleId="articleId"
                           v-on:turnPage="turnPage"></display-article-audit>
    <edit-article-audit v-if="articleAuditShow === 'edit'"
                        :articleId="articleId"
                        v-on:turnPage="turnPage"></edit-article-audit>
  </div>
</template>

<script>
  import displayArticleAudit from './DisplayArticleAudit'
  import editArticleAudit from './EditArticleAudit'
  import articleAuditList from './ArticleAuditList'

  export default {
    name: "ArticleManage",
    components: {
      articleAuditList: articleAuditList,
      displayArticleAudit: displayArticleAudit,
      editArticleAudit: editArticleAudit
    },
    data() {
      return {
        articleAuditShow: 'list',
        articleId:''
      }
    },
    methods: {
      turnPage(articleId, type) {
        this.articleId = articleId;
        this.articleAuditShow = type;
      },
    }
  }
</script>

<style scoped>

</style>
